package com.water.controller;

import com.water.entity.RdTask;
import com.water.service.RdTaskService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * (RdTask)表控制层
 *
 * @author 小博
 * @since 2020-12-15 10:03:46
 */
@Controller
@RequestMapping("rdtask")
public class RdTaskController {
    /**
     * 服务对象
     */
    @Resource
    private RdTaskService rdTaskService;

    /**
     * 跳转到任务分配
     * @param model
     * @return
     */
    @RequestMapping("/rdtask")
    public String rdyearmonth(Model model){
        List<Map<String, Object>> maps = rdTaskService.insertTask();
        model.addAttribute("map",maps);
        return "./rd/rd_task";
    }

    /**
     * 跳转到设置任务分配
     * @return
     */
    @RequestMapping("/rd_task_set")
    public String rd_task_set(){
        return "./rd/rd_task_set";
    }
}